import axios from 'axios'

axios.defaults.baseURL = 'http://localhost:3000'

axios.interceptors.request.use(function (config) {
    let token = localStorage.getItem('Token')
    if (token) {
        config.headers.Authorization = token
    }
    return config;
}, function (error) {
    return Promise.reject(error)
})

export default axios